package spring.library.LibraryProject.model;

import lombok.Data;

//总的返回类
@Data
public class response {
    boolean success;
    String errMsg;
    pageResponse data;


    public response success(Boolean success) {
        this.success = success;
        return this;
    }
    public response success(Boolean success,pageResponse data) {
        this.success = success;
        this.data = data;
        return this;
    }

    public response fail(String errMsg) {
        this.success = false;
        this.errMsg = errMsg;
        return this;
    }
//    public response(boolean success, pageResponse data) {
//        this.success = success;
//        this.data = data;
//    }
//
//    public response(boolean success) {
//        this.success = success;
//    }
}
